1. Field of the Invention
The present invention relates to an image processing apparatus and a control method therefor and, more particularly, to an image processing apparatus that performs chromatic aberration correction, and a control method therefor.
2. Description of the Related Art
Image capturing apparatus such as digital cameras are employed in a variety of applications. However, various aberrations of a lens used to form an object image degrade the image quality of the object image. Chromatic aberration of magnification, for example, generates a color shift in the formed object image.
The number of pixels on an image sensor used for an image capturing apparatus is increasing each year, so the pixel size is reducing. Along with this trend, even chromatic aberration of magnification, that is too small to pose a serious problem in the conventional image capturing apparatus, has become a cause of degradation in image quality.
To correct color shift from image processing, a technique to obtain the amount of color shift to be corrected (that is, the amount of correction) from an image to be corrected has been proposed. The technique of obtaining the amount of color shift from an image adopts methods that use correlation between individual color components on the edge portion of the image.
Japanese Patent Laid-Open No. 2000-299874, for example, proposes a method of obtaining the amount of color shift by detecting a position where the sum total of the differences between the distances of pixels for respective color components corresponding to the edge minimizes. Also, Japanese Patent Laid-Open No. 2006-020275 proposes a method of detecting an edge from raw data and obtaining, as the color shift range, a displacement range within which an error between arrays of two types of color components on the edge portion minimizes.
In the color shift amount obtaining methods which use correlation between individual color components, as described in Japanese Patent Laid-Open Nos. 2000-299874 and 2006-020275, it is often the case that a precise amount of color shift cannot be obtained on an edge which suffers a blur, as shown in FIG. 1A. As a result, the hue on the edge portion considerably changes before and after correction, so a satisfactory correction effect cannot be obtained.
For example, assume that a G (Green) component and an R (Red) component have no color shift between them, but the G component (or the R component) and a B (Blue) color component have a color shift between them, as shown in FIG. 1A. In this case, a portion in the image corresponding to a hatched portion in FIG. 1A is yellow. When this color shift is corrected using the amount of color shift obtained by a method as described in Japanese Patent Laid-Open No. 2000-299874 or 2006-020275, the pixel values after correction are as shown in, for example, FIG. 1B, so the portion in the image corresponding to the hatched portion changes to blue upon overcorrection. The edge portion shown in FIGS. 1A and 1B is yellow before correction and changes to blue after correction, and this makes the observer feel unnatural when he or she compares the edge portion before correction with that after correction. This is because an overcorrected portion has been generated as a result of correcting the B component such that an error between arrays of the B component and G component (or R component) minimizes. One method reduces this feeling of unnaturalness by adjusting the hue on the corrected edge portion, but it may then change the original color tone of the object.